<?php

namespace app\api\controller\v1;

use app\common\controller\Api;
use app\common\model\Menu as MenuModel;
/**
 * 接口
 */
class Menu extends Api
{
    protected $noNeedLogin = ['index'];
    protected $noNeedRight = [''];
    
    /**
     * [_initialize 初始化]
     * @return [type] [description]
     */
    public function _initialize()
    {
        parent::_initialize();
    }
     public function index($id=0)
    {
        $arr = MenuModel::where(['status' => 1,'pid'=>$id])->field('status,createtime,updatetime',true)->order('weigh DESC')->select();
        $this->success('',$arr);
    }
}